import axios from 'axios';

let base = 'http://www.com.com/api';

// export const requestLogin = params => { return axios.post(`${base}/login`, params).then(res => res.data); };

// export const getUserList = params => { return axios.get(`${base}/user/list`, { params: params }); };
//
// export const getUserListPage = params => { return axios.get(`${base}/user/listpage`, { params: params }); };
//
// export const removeUser = params => { return axios.get(`${base}/user/remove`, { params: params }); };
//
// export const batchRemoveUser = params => { return axios.get(`${base}/user/batchremove`, { params: params }); };
//
// export const editUser = params => { return axios.get(`${base}/user/edit`, { params: params }); };
//
// export const addUser = params => { return axios.get(`${base}/user/add`, { params: params }); };


export const requestLogin = params => { return axios.get(`http://www.com.com/api/lo`, params).then(res => res.data); };

export const getArticlesListPage = params => { return axios.get(`${base}/all/articles`, { params: params }).then(res => res.data); };

export const addArticle = params => { return axios.get(`${base}/add_article`, { params: params }).then(res => res.data); }
//
// export const catArticle = params => { return axios.get(`${ase}/article`, { params: params }); };
//
// export const editArticle = params => { return axios.get(`${ase}/article`, { params: params }); };
//
// export const removeArticles = params => { return axios.get(`${ase}/article`, { params: params }); };
//
// export const batchRemoveArticles = params => { return axios.get(`${ase}/article`, { params: params }); };